if (priv->last_visible_node)
{
- gtk_snapshot_offset (snapshot,
- priv->last_visible_surface_allocation.x,
- priv->last_visible_surface_allocation.y);
+ gtk_snapshot_save (snapshot);
+ gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (
+ priv->last_visible_surface_allocation.x,
+ priv->last_visible_surface_allocation.y));
gtk_snapshot_append_node (snapshot, priv->last_visible_node);
- gtk_snapshot_offset (snapshot,
- -priv->last_visible_surface_allocation.x,
- -priv->last_visible_surface_allocation.y);
+ gtk_snapshot_restore (snapshot);
}
gtk_snapshot_pop (snapshot);
if (priv->last_visible_node)
{
- gtk_snapshot_offset (snapshot, pos_x, pos_y);
+ gtk_snapshot_save (snapshot);
+ gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (pos_x, pos_y));
gtk_snapshot_append_node (snapshot, priv->last_visible_node);
- gtk_snapshot_offset (snapshot, -pos_x, -pos_y);
+ gtk_snapshot_restore (snapshot);
}
}
y -= (priv->last_visible_widget_height - height) / 2;
}
- gtk_snapshot_offset (snapshot, x, y);
+ gtk_snapshot_save (snapshot);
+ gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (x, y));
gtk_snapshot_append_node (snapshot, priv->last_visible_node);
- gtk_snapshot_offset (snapshot, -x, -y);
+ gtk_snapshot_restore (snapshot);
}
gtk_widget_snapshot_child (widget,